# -*- coding: UTF-8 -*-

from bottle import get ,post,request
#@route('/login')

@get('/login')
def login_form():
    return '''<from method = "post">
              <input name="name'type="text"/>
              <input name="pssword" type="password"/>
              <input type="submit" value="登录"/>
              </form>'''
@post('/login')
def login():
    name - request.forms.get('name')
    password = request.forms.get('password')
    if check_login(name,password):
        return 'login correct'
    else:
        return 'login faile'